package com.rover.crm.service;

import com.grid.DataGrid;
import com.grid.Page;
import com.rover.crm.entity.BillingRecords;
import com.rover.system.service.BaseService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* 开票记录Service
*/

@Service
@Transactional
public class BillingRecordsService extends BaseService {
protected Logger logger = LoggerFactory.getLogger(getClass());

@Transactional
public DataGrid query(Page page) throws Exception {
DataGrid dataGrid = new DataGrid();
List<BillingRecords> li = dao.<BillingRecords>findPageHql(page.getHQL(), page.getWhereParams(), page.getPageNo(),
    page.getPageSize());
    dataGrid.setResult(li);
    dataGrid.setTotalCount(dao.countHql(page.getHQLTotalCount(), page.getWhereParams()));
    return dataGrid;
    }



}
